package org.example.service.impl;

import org.example.dto.SelectRandomImagesResultDto;
import org.example.entity.Goods;
import org.example.mapper.GoodsMapper;
import org.example.service.IGoodsService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 
 * @since 2025-03-27
 */
@Service
public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements IGoodsService {


   @Autowired
   private GoodsMapper goodsMapper;

   @Override
   public List<Goods> FindGoods(Integer offset, Integer size) {
      return goodsMapper.FindGoods(offset,size);
   }

   @Override
   public List<Goods> Classification(String gCatagory, String gBrand, Integer offset, Integer size) {
      return goodsMapper.Classification(gCatagory,gBrand,offset,size);
   }

   @Override
   public List<Goods> FindGoodsByPrice(String isASC, Integer offset, Integer size) {
      return goodsMapper.FindGoodsByPrice(isASC,offset,size);
   }

   @Override
   public List<SelectRandomImagesResultDto> selectRandomImages() {
      return goodsMapper.selectRandomImages();
   }

   @Override
   public Integer CountGoods() {
      return goodsMapper.CountGoods();
   }
}
